//
//  DataModel.m
//  __PRODUCTNAME__
//
//  Created by dllo on 16/08/15
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "DataModel.h"
#import "SecData.h"
@implementation DataModel

+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [SecData class]};
}

//- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
//    if ([key isEqualToString:@"action"]) {
//        ActionModel *ac = [ActionModel modelWithDic:value];
//        _action_object = ac;
//    } else if ([key isEqualToString:@"data"]) {
//            NSMutableArray *array = [NSMutableArray array];
//            for (NSDictionary *dic in value) {
//                SecData *sec = [SecData modelWithDic:dic];
//                [array addObject:sec];
//            }
//            _ali_data = array;
//        }
//}

- (void)setValue:(id)value forKey:(NSString *)key {
    if ([key isEqualToString:@"data"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            SecData *sec = [SecData modelWithDic:dic];
            [array addObject:sec];
        }
        _data = array;
    }


}


@end
